package com.chencong.utils;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * @Author chencong
 * @Description 获得mysql连接
 * @Date 8:43 下午 2021/8/16
 * @Param
 **/
public class GetMysqlConnect {
    public static Connection getConnect() {
        Connection con = null;

        try {
            Class.forName("com.mysql.jdbc.Driver");

            con = DriverManager.getConnection("jdbc:mysql://localhost:3306/superset?useUnicode=true&characterEncoding=UTF-8", "root", "123456");

        } catch (Exception e) {
            System.out.println("-----------mysql get connection has exception , msg = " + e.getMessage());
        }
        return con;
    }
}
